﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace   GapCC.BritishGas
{
    /// <summary>
    /// Summary description for Version_1
    /// </summary>
    [WebService(Namespace = "http://www.gapcc.co.uk/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Version_1 : System.Web.Services.WebService
    {
        [WebMethod]
        public bool SaveHabits(GapCC.BritishGas.Habits habitats)
        {
            return habitats.Process();
        }

        [WebMethod]
        public Habits GetHabits(string schoolId, string className, DateTime start, DateTime end)
        {
            return GapCC.BritishGas.Habits.Load(schoolId, className, start, end);
        }

        [WebMethod]
        public GapCC.BritishGas.CarbonFootPrint DoCarbonCalculation(GapCC.BritishGas.CarbonCalculation calculation)
        {
            return calculation.Process();
        }

        [WebMethod]
        public CarbonCalculation GetCarbonCalculation(string schoolId, string className, DateTime start, DateTime end)
        {
            return GapCC.BritishGas.CarbonCalculation.Load(schoolId, className, start, end);
        }
    }
}
